<?php

namespace app\models;

use yii\base\Model;

class Category extends \yii\db\ActiveRecord
{

    public static function tableName(){
        return 'category';
    }


    public function rules(){
        return [
            [['cateName'], 'required'],
            [['cateId','createTime'], 'integer'],
            [['cateName'], 'string', 'max' => 50],
            [['img'], 'string', 'max' => 255],
        ];
    }
    public function attributeLabels(){
        return [
            'cateId'=>'Cate ID',
            'cateName'=>'Cate Name',
            'img'=>'Img',
            'createTime'=>'Create Time',
        ];
    }
}